home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: New Zealand Amiga Users Group / New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).zip / New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).adf / WBRes / wbres.doc < prev    next >
Text File  |  1993-12-03  |  21KB  |  420 lines

  1.                              WBRes Documentation 
  2.  
  3. Program: WBRes 1.2b.
  4.  
  5. Example: To start with, a quick example of what WBRes does.
  6.     1.  From Workbench, select any text file. Then select the "info" option
  7.         from the Workbench menu.
  8.     2.  Find the "Default Tool" field in the info display. Change the
  9.         string it contains to "HAHAHA:foo/baa/hooey". Then select the
  10.         "SAVE" gadget, in the lower-left.
  11.     3.  Now start WBRes, and load "more" into it. The program you loaded
  12.         will have its name shown in the left of the WBRes display. Click on
  13.         this name, and it should also appear in the lower-right of the
  14.         WBRes window.
  15.     4.  Click on the "ALIAS" gadget, and type in: "hooey", without quotes.
  16.     5.  Double-click on the text icon you had before. A system
  17.         requester should come up, asking you to insert the volume "HAHAHA".
  18.         Select "CANCEL" here. If one didn't appear, I'd like to know what
  19.         your assign list looks like!
  20.     6.  After you cleared the system requester, more (or whatever you used)
  21.         should appear and display the text file. This should seem
  22.         significant to you. If it doesn't seem significant, then this
  23.         program isn't for you, sorry. Enthusiastic amigans only, please.
  24.  
  25.     If you used "More", press 'q'. Select the QUIT gadget in WBRes, and
  26.     click on OK to get back to normal. Now see what happens when you
  27.     double-click that text file.
  28.  
  29. Purpose: To allow WB users to have "resident" programs. As in the resident
  30.     capability of WShell, Sharp (ARP Shell), and the WB1.3 Shell.
  31.  
  32.     This program owes its existence to the fact that I noticed Lattice C
  33.     5.0's cres startup module goes through the "residenting" process
  34.     regardless of where the program was started from. Sensible stuff.
  35.  
  36. Author:  John Bickers (JJB TEMPLAR),
  37.          214 Rata St,
  38.          Naenae 6301,
  39.          New Zealand.   PH: (04) 672-085.
  40.  
  41.     The Iconify code used is Leo Schwab's, from Fish 126. I have added a
  42.     tiny bit to allow users to click the icon backwards and forwards.
  43.  
  44.     The file requester code is RJ Mical's, from Fish 107. I have changed it
  45.     a little bit, to use my imagery, and to use the main window instead of
  46.     a requester. Any problems it now has are entirely my fault.
  47.  
  48.     And substantial suggestions and bug-spottings were made by Tony Wills,
  49.     President of the NZ Amiga Users' Group.
  50.  
  51. Starting WBRes:
  52.     WBRes can be started from either CLI or Workbench. Some of the possible
  53.     errors that can occur at this point are:
  54.     Someone's got the DOS "vectors"!
  55.         WBRes must intercept some of the DOS vectors. The unusual nature of
  56.         the DOS library vectors means multiple intercepting programs will
  57.         have problems. So WBRes fails if someone is already there,
  58.         including itself (though it didn't detect J Goodnow's "REZ").
  59.     Workbench isn't there!
  60.         WBRes requires the Workbench task to have been started before WBRes
  61.         installs itself. If it hasn't been loaded, then there is no point
  62.         in running WBRes anyway.
  63.  
  64.     These errors are not reported if the program was started from the WB.
  65.     So to determine what's going on, try starting WBRes from a CLI.
  66.  
  67.     CLI arguments:
  68.     The format is:      WBRes [<-opt>] [<file>]
  69.         where [] means optional, <> means 1 or more.
  70.     The options are:
  71.         'I'     : Set Autoicon flag to ON.
  72.         'a'     : Toggle the state of the "active" flag when loading
  73.             programs from the following CLI argument list. This flag starts
  74.             in the ON position. For example, entering:
  75.                 1> WBRes c:more -a c:display
  76.             will load the programs as follows:
  77.                         more:       active
  78.                         display:    inactive
  79.         'i'     : Toggle the state of the "ignore checksum" mode. Works in
  80.             the same way as the 'a' flag, but starts in the OFF position.
  81.  
  82.     WBRes also uses Lattice C 5.0's cback module to launch itself into the
  83.     background if started from the CLI. So console output may be broken by
  84.     your console's prompt. The console may then be shut down. Also, ARP 1.3
  85.     has the annoying tendency to claim a program doesn't release all its
  86.     resources. Ignore this message. Basically, it's none of ARP's business.
  87.  
  88.     It's a frighteningly small step between ARP thinking it knows when to
  89.     interfere, and ARP actually doing something about it. I hope that never
  90.     happens, despite their arrogance.
  91.  
  92.     WB arguments:
  93.     These are contained in the ToolTypes array of the WBRes icon. In order
  94.     to scan for arbitrary filenames, these do not work exactly like they
  95.     normally do. So if you plan to use these arguments, please take note.
  96.     The icon is NOT checked if WBRes was started from the CLI.
  97.  
  98.     The ToolType entries are understood as follows:
  99.         ICONIFY=ON .............. This literal string sets Autoicon to ON.
  100.         [*[<a|i| >]=]filename ... This specifies "filename" as a file to be
  101.             loaded by WBRes. The optional modes string allows you to
  102.             specify the state of the "active" and "ignore checksum" flags
  103.             when loading. The default states for each file are active = on,
  104.             ignore checksum = off.
  105.         !{alias}={name} ......... This specifies "alias" as an alias for
  106.             "name". Note the absence of spaces.
  107.         #[comment] .............. The '#' character indicates a comment.
  108.  
  109.     The following (between "") are example lines from the ToolTypes array.
  110.  
  111.     ×»  "ICONIFY=ON"
  112.         Sets Autoicon to ON. Note that ICONIFY=OFF is NOT the reverse.
  113.  
  114.     ×»  "AmigaLibDisk230:Fedup/Fedup"
  115.         This would load Fedup, from the disk AmigaLibDisk230.
  116.  
  117.     ×»  "*ai=AmigaLibDisk230:Fedup/Fedup"
  118.         This would load Fedup, but with the active mode off, and the ignore
  119.         checksum mode on.
  120.  
  121.     ×»  "*aia i=My Boot Disk:c/more"
  122.         This would load more. Note that the redundant flags in the modes
  123.         string have no effect. They do NOT act as toggles.
  124.  
  125.     ×»  "!less=more"
  126.         This would specify that "less" was an alias of "more", if more had
  127.         been loaded, and the name "less" had not already been used.
  128.  
  129.     ×»  "# This is a comment!"
  130.         Well...
  131.  
  132.     S:startup-wbres arguments:
  133.     If there is a file in your S: directory called "startup-wbres", it will
  134.     be checked for startup arguments. These follow the same format as the
  135.     ToolTypes arguments for WB. This file is checked whether you started
  136.     from CLI or WB. So regular users may prefer to use this rather than the
  137.     WB or CLI arguments.
  138.  
  139.     I do not check quietly that S: exists. I can, if there is a problem
  140.     with this. As far as I know, the S: directory is only missing if you
  141.     removed it yourself. So don't blame me if you get asked to insert it.
  142.  
  143. The display:
  144.     The resident list is displayed in the grey square to the left. Use
  145.     the scroll bar, arrow gadgets, or up/down keys to move up and down the
  146.     list if it is too long to be displayed all at once.
  147.  
  148.     The current command, if there is one, is shown in the black rectangle
  149.     in the lower right. Above this rectangle are the main control Gadgets.
  150.  
  151.     The format of an entry in the display list indicates the state of the
  152.     program for that entry (or node).
  153.         A white circle filled with red means this node is "active".
  154.         An empty white circle means this node is not "active".
  155.         A small x means this node has a bad checksum.
  156.         Red text means you want the checksum ignored for this node.
  157.         A name with a "---" usage count, no small image, and a name in
  158.             brackets following it, means this node is an alias.
  159.     The 3 digits to the right are the lower 3 decimal digits of the usage
  160.     count that is kept for that program.
  161.  
  162.     Whenever the main window is opened, the current Workbench colors are
  163.     saved, and WBRes' palette is loaded. When the window is closed (ie:
  164.     terminating, or Iconifying) the old colors are put back. I'll use
  165.     Preferences to do this when it becomes necessary (WB1.4?).
  166.  
  167.     The reason for this is that the gadget shadows, etc, don't come out
  168.     well in the default Workbench color scheme.
  169.  
  170.     Most gadgets, etc, use the topaz 8 font where I was able to get them
  171.     to. However, the window title is not changed, and the font used in the
  172.     string requester is not changed. They will be, as soon as I figure out
  173.     how to accomplish it.
  174.  
  175. Operations:
  176.     Some operations require a "current node" to be selected. To do this,
  177.     click on the name of a program in the displayed resident list. If no
  178.     programs are displayed, then load one/some.
  179.  
  180.     Load ...... This loads a command. I chose to implement RJ Mical's
  181.         ProSuite requester rather than the ARP requester, because I like it
  182.         more. The only problem is that it starts from df0:, rather than the
  183.         directory you started WBRes from. I'm pretty sure that's my fault,
  184.         though, and I don't see it as a problem for this program.
  185.  
  186.         The main reason I use this one instead of ARP's is that the ARP
  187.         requester always goes to the disk each time it's visited, and
  188.         updates the file list in a strange way. I find both these things
  189.         extremely annoying.
  190.  
  191.         The happy/sad faces, and the red hat, are DEVO related images.
  192.  
  193.     Delete .... This removes the current program from the resident list. It
  194.         requires you to verify the deletion. A reason this may not work is
  195.         that the current program has an invocation running. In this case it
  196.         would not be safe to remove it from the list. Actually, it is safe,
  197.         but there are problems.
  198.  
  199.         If you delete an alias, only the alias node will be removed. If you
  200.         delete a node that has aliases bound to it, all the aliases will be
  201.         deleted too.
  202.  
  203.     Pick ...... Clicking on a program name in the list display will make
  204.         that program the current node. This must be used before the node-
  205.         specific operations, like "Delete", etc.
  206.  
  207.     Activate .. Clicking on the white circle at the left of a program name
  208.         in the display list will toggle that node's "active" state. If a
  209.         program is not active, then the resident copy of the program will
  210.         be bypassed. An active node is indicated by a white circle filled
  211.         with red.
  212.  
  213.     Ignore .... This toggles a flag telling WBRes to ignore the checksum
  214.         used to verify a program's purity. This is based on the way WHawes'
  215.         "resi" command does things. It is necessary for programs like CBM's
  216.         "more", which work as resident programs, but do get a bad checksum
  217.         error. Programs with this flag ON are drawn as red, with no shadow.
  218.  
  219.     Rename .... Rename the current node. The new name can be up to 30-odd
  220.         characters, a little bit more than DOS itself allows, though that
  221.         wouldn't generally be useful to you. You are not allowed to use
  222.         names already present on the list. There are reasons for using this
  223.         as well as having an "Alias" operation, like renaming aliases.
  224.  
  225.     Alias ..... Define an alias for the current node. You are not allowed
  226.         to use names already present on the list. If the current node
  227.         itself is an alias, then the new alias is bound onto the real node
  228.         that the current node is bound to. So the aliases are only one
  229.         level deep. Note that only programs loaded into WBRes can have
  230.         aliases. A general Workbench alias capability can be added, but
  231.         only if demand is great enough.
  232.  
  233.         As to why there is an alias command, a good example is PD disks and
  234.         text display programs. A single text reader (eg: "More") can be
  235.         loaded into WBRes, and then by defining a series of aliases, like
  236.         "most" (AmigaTECH), "PrinText" (AmsMag), "QView" (Amigan), "Less"
  237.         and "Muchmore" (AmigaLibDisks), etc, I can browse through text
  238.         files with a single text reader.
  239.  
  240.         Another example is browsing through pictures, where for example the
  241.         default tool is DPaint. When all you want to do is look at the
  242.         pics, it is nice to be able to load C Scheppner's Display1.06, turn
  243.         off the checksum check, and define DPaint as an alias of display.
  244.  
  245.     Iconify ... This makes WBRes Iconify. Leo Schwab's excellent Iconify
  246.         function from Fish126 is used for this. To de-iconify the program,
  247.         double-click on the small image. Having the gadget in the title bar
  248.         was suggested by Tony Wills, who thinks this would be a nice place
  249.         for everyone to put an iconify gadget.
  250.  
  251.         The first time WBRes is Iconified, the icon appears under your
  252.         pointer. This is so that you can move it to wherever you want it
  253.         with a minumum of fuss.
  254.  
  255.         Another suggestion from Tony was to give the icon depth gadgets.
  256.         Loath though I was to mess with Schwab's code, I made some very
  257.         minor additions to allow the following:
  258.             If you click on the happy face, the "icon" will come forward.
  259.             If you click on the sad face, the "icon" will move backwards.
  260.         The faces idea comes from the cover of the Total DEVO album, by
  261.         DEVO (apparently an Amiga was used to generate some of their
  262.         graphics).
  263.  
  264.     Help....... This displays a few fairly meagre help "screen"s.
  265.  
  266.     Quit ...... Will terminate WBRes. It will not terminate if there are
  267.         any programs on the list that have a current invocation running.
  268.         Any commands not running will be deleted, as will all aliases.
  269.  
  270.     NewCLI .... Will start a new CLI. I found this useful for redirecting
  271.         assigns, or quickly checking things via CLI. If you have ConMan
  272.         active, the CLI will have a close gadget. If you also have PatchDOS
  273.         and WShell active, this close gadget will actually work!
  274.  
  275. Controls:
  276.     By operation, the controls are:
  277.         Activate .. Explained above.
  278.         Alias ..... ALIAS gadget, or press 'A'.
  279.         Delete .... DELETE gadget, or press 'DEL'.
  280.         Help ...... HELP gadget, or press 'HELP'.
  281.         Iconify ... 3rd gadget from right in titlebar, or press 'F1'.
  282.         Ignore .... IGNORE gadget, or press 'I'.
  283.         Load ...... LOAD gadget, or press 'L'.
  284.         NewCLI .... Press 'N', or '*' on the numeric keypad.
  285.         Pick ...... Explained above.
  286.         Quit ...... QUIT gadget, close window, or press 'ESC'.
  287.         Rename .... Press 'R'.
  288.  
  289.     In addition, you can "next-page" the help displays by pressing 'SPACE',
  290.     and use the arrow keys, scroll bar, or arrow gadgets to move up and
  291.     down within the display list.
  292.  
  293.     The JJB/TEMPLAR gadget is my semi-active logo, and doesn't do much.
  294.  
  295. The Future:
  296.     Depending on the demand, and the availability of documentation, I would
  297.     like to add (at least) the following:
  298.  
  299.     ×»  Scanning WShell's resident list. And CBM's and ARP's if possible.
  300.         Also, if it doesn't make WBRes redundant, I'll update it to handle
  301.         Workbench 1.4. I can, if there's any demand for it, get WShell to
  302.         make use of my list using the method outlined in Appendix B of "The
  303.         Beachcomber's Guide to the WShell". But there's no facility there
  304.         for letting WBRes know that an invocation has terminated. If I do
  305.         get to use the WShell resident list, I may not do CBM's or ARP's.
  306.         Almost everyone should buy WShell anyway, to make up for not paying
  307.         the shareware on Conman.
  308.  
  309. Known problems:
  310.     There are several "critical" sections in this program, that I have not
  311.     protected. In practice it appears they zip by too fast for the user to
  312.     be able to cause a GURU, but if there are problems I'll add the protect
  313.     code. I'd like to evaluate the necessity for it first.
  314.  
  315.     Intercepting the DOS functions was not a happy task. I make one or two
  316.     assumptions about the format of the DOS library that may break with
  317.     KS1.3 or higher. Let me know.
  318.  
  319.     In connection with intercepting the DOS functions, I discovered and
  320.     tried to use Jim Goodnow's REZ program (from TBAG 17). In case anyone
  321.     does use his program, WBRes does NOT do anything special when loading
  322.     programs to make them residentable. So while programs don't have to be
  323.     "pure" to work with REZ, they do have to be "pure" to work properly
  324.     with WBRes. And thus programs that may have worked OK with REZ may not
  325.     work OK with WBRes. I intercept and fool around with LoadSeg's
  326.     arguments, whereas REZ (from the documentation) replaces LoadSeg
  327.     altogether.
  328.  
  329.     WB1.4 has been rumored to multitask. This may cause a problem, if the
  330.     "Workbench" task is not the one that calls LoadSeg for Workbench. But
  331.     then CBM may have a WB resident capability of their own, so there won't
  332.     be any need for WBRes.
  333.  
  334.     If you have multiple "Workbench" tasks, which is possible by using the
  335.     "loadwb" command twice, then WBRes may lock onto the wrong one. So if
  336.     you're clicking like crazy, but WBRes isn't intercepting anything, then
  337.     run Asktask or somesuch to see how many Workbenches you have. Hopefully
  338.     loadwb will eventually test to see if Workbench is already there before
  339.     it starts a new Workbench. In the interim, carefully RemTask one of the
  340.     Workbenches with Asktask (or somesuch), making sure that the one you
  341.     zap is the one that isn't getting your input. A simple test is clicking
  342.     on a BIG program (or something from a floppy), and while the Workbench
  343.     pointer is a cloud, see which Workbench task is busy (with Asktask, or
  344.     somesuch). Zap the OTHER one. Then restart WBRes.
  345.  
  346. Distribution:
  347.     This program is almost freely redistributable. That is, anyone may
  348.     distribute it provided the following requirements are met:
  349.  
  350.     1.  This documentation file accompanies it.
  351.     2.  The distribution is non-commercial in nature, with the exception of
  352.         WHawes' WShell. AmigaLibDisk would be great, as would any other PD
  353.         disks. If I have to relinquish my copyright for a given
  354.         distribution, then that distribution is not permitted to have this
  355.         program.
  356.     3.  Neither WBRes nor this doc file are altered, other than for
  357.         archiving purposes (this means YOU, Tony! :-), with the sole
  358.         exception of adding to the list at the end of this file.
  359.     4.  It's understood that I accept no responsibility for any losses this
  360.         program may cause. The only warrantee is that it works fine on my
  361.         machine (now where have I heard that before...).
  362.  
  363.     While this program is freely redistributable, it is:
  364.  
  365.     1.  Copyright © 1989 by John Bickers.
  366.         Actually, this isn't formally registered anywhere, if that's
  367.         necessary, so perhaps it isn't. Oh well :-).
  368.     2.  Shareware. The amount is up to you. The obligation is entirely
  369.         moral, and only required if you use this program often.
  370.         Experimenting is free. Please note that I'm currently very poor,
  371.         and have 104 children to feed, put through school, etc (**), so I
  372.         need every cent.
  373.     This is all negotiable, but with me, and probably at some cost.
  374.  
  375.     My "policy" on this shareware stuff is:
  376.  
  377.     1.  The top $5 is a contribution, and pays for registration.
  378.     2.  Every $5 after that is also a contribution, but pays for postage of
  379.         updates, etc, if there are any.
  380.     3.  The top $5 may be replaced by non-financial rewards like:
  381.             Used electronic music (eg: DEVO, Men Without Hats).
  382.             PD stuff.
  383.             Or whatever. As long as I won't be had up by the Customs Dept.
  384.     4.  Any problems/complaints will only be answered if the person
  385.         involved is a registered user, or one of the people named below.
  386.         IE: if I shake the envelope, and only a letter falls out, both go
  387.             into the dustbag (after I've secured the stamp :-).
  388.     5.  The actual funds may be in any legal currency. I was going to
  389.         specify $NZ drawn on an NZ bank, like the Yanks specify $US, but
  390.         thought better of it.
  391.  
  392.     The following people are exempt from the shareware burden:
  393.             Tony Wills,             Fred Fish,
  394.             Will Hawes,             Leo Schwab,
  395.     and past and present employees of CBM, or companies owned by CBM.
  396.  
  397. Complaints/Suggestions/Questions:
  398.     Contact:-   John Bickers,
  399.                 214 Rata St,
  400.                 Naenae 6301,
  401.                 New Zealand.
  402.  
  403.     Phone:-     (04) 672-085.
  404.  
  405. **  The part about the kids is not actually true. But I do need to keep my
  406.     machine out of repossession.
  407.  
  408. Programs that I know work:
  409.     Programs marked with a '*' are not really residentable. If they exit
  410.     prematurely (eg: bad file type), then you're stuck.
  411.  
  412.     More3.23, from CBM. Checksum off.
  413.   * Display1.06, from CBM (C Scheppner). Checksum off. Not reentrant.
  414.     Ty1.3, from 1st NZAmigaUG.
  415.     NewWSH, part of the WShell package.
  416.     Any program linked OK with Lattice C's cres startup module.
  417.     The DOS commands. These are of no use to WB users, however.
  418.  
  419.    [Feel free to add to this list, but keep it to one-line per prog.]
  420.